package com.ys.enume.finance;

public class TcwWanliPayoutEnum {
	
	public enum Type {
		TCW_WANLICURRENCYEXCHANGE("万里汇货币兑换单", 1),
		TCW_WANLIDRAWING("万里汇提款单", 2),
		TCW_WANLICNYPAYMENT("万里汇CNY付款单", 3),
		TCW_WANLIPAYMENTRETURN("万里汇预付款退回", 4),
		TCW_WANLIOTHERPAYMENT("万里汇外币付款单", 5);
		public String name;
		public Integer value;

		private Type(String name, Integer value) {
			this.name = name;
			this.value = value;
		}

		public static String getName(int value) {
			for (Type e : Type.values()) {
				if (e.value == value) {
					return e.name;
				}
			}

			return "";
		}

		public static Integer getValue(String name) {
			for (Type e : Type.values()) {
				if (e.name.equals(name)) {
					return e.value;
				}
			}
			return null;
		}
	}
	
	public enum State {
		INIT("初始化", 0), PROCESS("进行中", 1), SUCCESS("成功", 2), FAIL("失败", 3);
		public String name;
		public Integer value;

		private State(String name, Integer value) {
			this.name = name;
			this.value = value;
		}
	}
}
